<%--/*
- * @description: 用户首页
- * @author: huangchuting
- * @update: huangchuting (2021/1/9 18:28)
- */--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>校园租赁-用户首页</title>
</head>
<link rel="stylesheet" href="/static/css/public.css">
<link rel="stylesheet" href="/static/css/user-index.css">
<script type="text/javascript" src="/static/js/changeDiv.js"></script>
<body>

        <div class="header">
            <div class="logoWarp">
                <img class="logo" src="/static/images/public/school_name.png" />
                &nbsp; &nbsp;<span>校园租赁网站</span>
            </div>
            <div class="searchWarp">
                <form class="searchForm" method="post" action="/Item/search">
                    <%--两个input并列有8px空隙，通过float:left解决--%>
                        <input type="hidden" value="0" name="pageNo">
                    <input type="text" name="search" class="searchText" placeholder="查什么呢你，你查不到的">
                    <input type="submit" name="searchFromBut" class="searchFromBut" value="查询">
                </form>
            </div>
            <div class="loginBar">
                <div class="publish">
                   <a href="/Home/publish"><span>我要发布</span></a>
                </div>
                <div class="usernameWarp">
                  <span class="username">  <%=session.getAttribute("user_name")%>
                    &nbsp; | &nbsp;&nbsp;</span>
                    <div class="moreWarp">
                        <ul  onMouseOver="change('drop','block')" onMouseOut="change('drop','none')">
                            <li>
                                <div class="more"></div>
                            </li>
                            <li>
                                <ul id="drop">
                                    <a href=""><li>更改信息</li></a>
                                    <a href="/User/outLogin"><li>退出</li></a>
                                    <a href="/User/user-news"><li>个人中心</li></a>
                                </ul>
                            </li>
                        </ul>
                    </div>

                </div>
            </div>

        </div>
        <%--导航条--%>
        <div class="nav">
            <ul>
                <li>
                    <a href="/Item/new-publish?type=0">
                    <div class="navImgWarp">
                        <img src="/static/images/public/new.png">
                    </div>
                    <span>最新发布</span>
                    </a>
                </li>
                <li>
                    <a href="/Item/new-publish?type=1">
                        <div class="navImgWarp">
                            <img src="/static/images/public/book.png">
                        </div>
                        <span>图书教材</span>
                    </a>
                </li>
                <li>
                    <a href="/Item/new-publish?type=2">
                        <div class="navImgWarp">
                            <img src="/static/images/public/smart.png">
                        </div>
                        <span>数码电器</span>
                    </a>
                </li>
                <li>
                    <a href="/Item/new-publish?type=3">
                        <div class="navImgWarp">
                            <img src="/static/images/public/cloth.png">
                        </div>
                        <span>美妆衣物</span>
                    </a>
                </li>
                <li>
                    <a href="/Item/new-publish?type=4">
                        <div class="navImgWarp">
                            <img src="/static/images/public/lift.png">
                        </div>
                        <span>生活用品</span>
                    </a>
                </li>
                <li>
                    <a href="/Item/new-publish?type=5">
                        <div class="navImgWarp">
                            <img src="/static/images/public/ticket.png">
                        </div>
                        <span>票卷小物</span>
                    </a>
                </li>
                <li>
                    <a href="/Item/new-publish?type=6">
                        <div class="navImgWarp">
                            <img src="/static/images/public/run.png">
                        </div>
                        <span>快递跑腿</span>
                    </a>
                </li>
                <li>
                    <span class="navCopyright">关于我们，联系我们</span><br>
                    <span class="navCopyright">©2021 版权所有 by 黄楚婷</span><br>
                    <span class="navCopyright">| 邮箱  2359220243@qq.com</span><br>
                </li>
            </ul>
        </div>
        <div class="contentWarp">
            <div class="TypeWarp">
                <h3>最新发布 <a href="/Item/new-publish?type=0" class="moreItemWarp"> 查看更多>>> </a></h3>
                <c:forEach items="${itemOnTime}" var="var" varStatus="vs">
                    <c:if test="${vs.index < 4}">
                        <div class="ItemNewWarp">
                            <a href="/Item/item-news?item_id=${var.item_id}">
                                <div class="itemImgWarp">
                                    <img src="/static/images/item/${var.image}">
                                </div>

                                <span class="price" >${var.price}</span><br>
                                <span class="name">${var.item_name}</span><br>
                            </a>
                            <span class="time">${var.publish_time}</span><br>
                        </div>
                    </c:if>
                </c:forEach>
            </div>
            <div class="TypeWarp">
                <h3>图书教材 <a href="/Item/new-publish?type=1" class="moreItemWarp"> 查看更多>>> </a> </h3>
                <c:forEach items="${itemBook}" var="var" varStatus="vs">
                    <c:if test="${vs.index < 4}">
                        <div class="ItemNewWarp">
                            <a href="/Item/item-news?item_id=${var.item_id}">
                                <div class="itemImgWarp">
                                    <img src="/static/images/item/${var.image}">
                                </div>

                                <span class="price" >${var.price}</span><br>
                                <span class="name">${var.item_name}</span><br>
                            </a>
                            <span class="time">${var.publish_time}</span><br>
                        </div>
                    </c:if>
                </c:forEach>

            </div>
            <div class="TypeWarp">
                <h3>数码电器 <a href="/Item/new-publish?type=2" class="moreItemWarp"> 查看更多>>> </a></h3>
                <c:forEach items="${itemSmart}" var="var" varStatus="vs">
                    <c:if test="${vs.index < 4}">
                        <div class="ItemNewWarp">
                            <a href="/Item/item-news?item_id=${var.item_id}">
                                <div class="itemImgWarp">
                                    <img src="/static/images/item/${var.image}">
                                </div>

                                <span class="price" >${var.price}</span><br>
                                <span class="name">${var.item_name}</span><br>
                            </a>
                            <span class="time">${var.publish_time}</span><br>
                        </div>
                    </c:if>
                </c:forEach>
            </div>
            <div class="TypeWarp">
                <h3>美妆衣物 <a href="/Item/new-publish?type=3" class="moreItemWarp"> 查看更多>>> </a></h3>
                <c:forEach items="${itemCloth}" var="var" varStatus="vs">
                    <c:if test="${vs.index < 4}">
                        <div class="ItemNewWarp">
                            <a href="/Item/item-news?item_id=${var.item_id}">
                                <div class="itemImgWarp">
                                    <img src="/static/images/item/${var.image}">
                                </div>

                                <span class="price" >${var.price}</span><br>
                                <span class="name">${var.item_name}</span><br>
                            </a>
                            <span class="time">${var.publish_time}</span><br>
                        </div>
                    </c:if>
                </c:forEach>
            </div>
            <div class="TypeWarp">
                <h3>生活用品 <a href="/Item/new-publish?type=4" class="moreItemWarp"> 查看更多>>> </a></h3>
                <c:forEach items="${itemLift}" var="var" varStatus="vs">
                    <c:if test="${vs.index < 4}">
                        <div class="ItemNewWarp">
                            <a href="/Item/item-news?item_id=${var.item_id}">
                                <div class="itemImgWarp">
                                    <img src="/static/images/item/${var.image}">
                                </div>

                                <span class="price" >${var.price}</span><br>
                                <span class="name">${var.item_name}</span><br>
                            </a>
                            <span class="time">${var.publish_time}</span><br>
                        </div>
                    </c:if>
                </c:forEach>
            </div>
            <div class="TypeWarp">
                <h3>票卷小物 <a href="/Item/new-publish?type=5" class="moreItemWarp"> 查看更多>>> </a> </h3>
                <c:forEach items="${itemTicket}" var="var" varStatus="vs">
                    <c:if test="${vs.index < 4}">
                        <div class="ItemNewWarp">
                            <a href="/Item/item-news?item_id=${var.item_id}">
                                <div class="itemImgWarp">
                                    <img src="/static/images/item/${var.image}">
                                </div>

                                <span class="price" >${var.price}</span><br>
                                <span class="name">${var.item_name}</span><br>
                            </a>
                            <span class="time">${var.publish_time}</span><br>
                        </div>
                    </c:if>
                </c:forEach>
            </div>
            <div class="TypeWarp">
                <h3>快递跑腿 <a href="/Item/new-publish?type=6" class="moreItemWarp"> 查看更多>>> </a> </h3>
                <c:forEach items="${itemRun}" var="var" varStatus="vs">
                    <c:if test="${vs.index < 4}">
                        <div class="ItemNewWarp">
                            <a href="/Item/item-news?item_id=${var.item_id}">
                                <div class="itemImgWarp">
                                    <img src="/static/images/item/${var.image}">
                                </div>

                                <span class="price" >${var.price}</span><br>
                                <span class="name">${var.item_name}</span><br>
                            </a>
                            <span class="time">${var.publish_time}</span><br>
                        </div>
                    </c:if>
                </c:forEach>
            </div>
        </div>
</body>
</html>
